package io.renren.modules.sys.service.impl;

import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.sys.dao.HatCityDao;
import io.renren.modules.sys.entity.HatCityEntity;
import io.renren.modules.sys.service.HatCityService;


@Service("hatCityService")
public class HatCityServiceImpl extends ServiceImpl<HatCityDao, HatCityEntity> implements HatCityService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<HatCityEntity> page = this.page(
                new Query<HatCityEntity>().getPage(params),
                new QueryWrapper<HatCityEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<HatCityEntity> getCityByProvince(String id){
        List<HatCityEntity> hatCityEntityList = baseMapper.getCityByProvince(id);
        return hatCityEntityList;
    }

}
